﻿@model PagedList<BankData>
<table class="table">
    <thead>
        <tr>
            <th style="width: 80px;">
                签出日期
            </th>
            <th style="width: 120px">
                账单编号
            </th>
            <th style="width: 150px;">
                付款人
            </th>
            <th style="width: 40px">
                币种
            </th>
            <th style="width: 80px">
                实际收款
            </th>
            <th style="width: 70px">
                手续费
            </th>
            <th style="width: 150px">
                交易附言
            </th>
            <th style="width: 80px">
                已认款
            </th>
            <th style="width: 80px">
                已退款
            </th>
            <th style="width: 70px">
                共享签出
            </th>
            <th style="width: 86px;">
            </th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>@if(item.MyCheck(User.Identity.Name)!=null)
                    {
                        @item.MyCheck(User.Identity.Name).ApplyTime.ToCommonStr2()
                    }
                </td>
                <td>@Html.DetailsLink(item.Id, item.Assiginment)
                </td>
                <td>@item.Payer
                </td>
                <td>@item.Currency
                </td>
                <td>@Html.DisplayFor(m => item.BankPaidIn)
                </td>
                <td>@Html.DisplayFor(m => item.BankServiceFee)
                </td>
                <td style="width: 150px;">@Html.DisplayFor(m => item.LCNumber)
                </td>
                <td>@item.Paymented()
                </td>
                <td>@item.Refundmented()
                </td>
                <td>
                    @(item.Shared() ? "是" : "否")
                </td>
                <td style="width: 80px;">
                    @if (User.IsInRole("CSR"))
                    {//CSr
                        @Html.ShowEditDialog("申请认款", "AddPayment", new { BankDataId = item.Id }, condition: item.IsCanPayment(User.Identity.Name)) 
                        @Html.EditLink(item.Id, "申请退款", action: "AddRefundment", condition: item.IsCanRefundment(User.Identity.Name)) 
                        @Html.EditLink(item.Id, "申请争议", action: "ApplyDispute", condition: item.IsCanDispute(User.Identity.Name))
                        @Html.JSLink("撤销签出", "CancelCheckRecord", "CancelCheckRecordAlert(this)", new { item.Id }
                                         , new { @class = "btn btn-mini" }, condition: item.IsCanCancelCSRCheck(User.Identity.Name))
                    }
                </td>
            </tr>
        }
    </tbody>
</table>
@Html.CommonPager(Model, ViewData["SearchModel"],"CheckSearch")
